Skip to content

feat(dns): add support for hickory-resolver#64

Merged
Berrysoft merged 21 commits into
compio-rs:masterfrom
Berrysoft:dev/hickory
May 10, 2026
Merged

feat(dns): add support for hickory-resolver#64
Berrysoft merged 21 commits into
compio-rs:masterfrom
Berrysoft:dev/hickory

Conversation

@Berrysoft

Copy link
Copy Markdown
Member

Closes #60

The hickory crates assume strongly that tokio exists. This PR adds support for DoT and DoH, but without DoQ or DoH3.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds an optional DNS resolver implementation based on hickory-resolver, integrating it into cyper via a new cyper-hickory workspace crate and a hickory-dns feature flag (enabling DoT/DoH support).

Changes:

  • Added new cyper-hickory crate implementing hickory runtime/connection provider adapters for compio, including TLS (DoT) and HTTPS (DoH) transports.
  • Integrated an optional hickory-dns resolver into cyper’s ClientBuilder, with an opt-out no_hickory_dns() method and updated error typing/deps.
  • Updated tests and blocking backend runtime usage to align with compio runtime requirements.

Reviewed changes

Copilot reviewed 12 out of 12 changed files in this pull request and generated 6 comments.

Show a summary per file
File Description
Cargo.toml Adds cyper-hickory to the workspace and centralizes shared deps (http, http-body-util, hickory crates).
cyper/Cargo.toml Adds optional hickory-dns feature and optional deps (cyper-hickory, hickory-*), plus workspace dep alignment.
cyper/src/client.rs Adds hickory_dns builder toggle, defaulting on when feature is enabled, and threads resolver into connectors/HTTP3 client.
cyper/src/lib.rs Adds a hickory-related error variant behind hickory-dns.
cyper/src/nyquest/blocking.rs Ensures client creation happens inside a compio runtime via runtime.enter(...).
cyper/src/resolve.rs Introduces HickoryResolver behind hickory-dns implementing Resolve.
cyper/tests/client.rs Converts two JSON tests to #[compio::test] async fn to run under the compio runtime.
cyper-hickory/Cargo.toml Defines the new crate, optional features for tls/https, and required deps for DoH plumbing.
cyper-hickory/src/lib.rs Implements the core hickory runtime provider + connection provider adapter for compio.
cyper-hickory/src/tls.rs Adds TLS (DoT) connection setup for hickory exchanges.
cyper-hickory/src/https.rs Adds HTTPS (DoH) connection setup using hyper + cyper-core stream integration.
cyper-hickory/tests/resolve.rs Adds basic resolution tests (but currently not asserting transport selection for tls/https).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread cyper-hickory/src/lib.rs
Comment thread cyper-hickory/src/https.rs
Comment thread cyper-hickory/src/https.rs
Comment thread cyper/src/client.rs Outdated
Comment thread cyper-hickory/tests/resolve.rs
Comment thread cyper-hickory/tests/resolve.rs

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 12 out of 12 changed files in this pull request and generated 6 comments.

Comment thread cyper/src/resolve.rs Outdated
Comment thread cyper/src/resolve.rs
Comment thread cyper/src/client.rs
Comment thread cyper-hickory/tests/resolve.rs Outdated
Comment thread cyper-hickory/src/https.rs
Comment thread cyper-hickory/Cargo.toml Outdated
@Berrysoft
Berrysoft merged commit 070bbf8 into compio-rs:master May 10, 2026
33 checks passed
@Berrysoft
Berrysoft deleted the dev/hickory branch May 10, 2026 17:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support hickory-dns

2 participants